/*
 * Copyright:  2018 smarabbit studio.
 *
 *  Licensed under the Confluent Community License; you may not use this file
 *  except in compliance with the License.  You may obtain a copy of the License at
 *
 *  http://www.confluent.io/confluent-community-license
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OF ANY KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations under the License.
 *
 *  @作   者： 黄开晖 (117227773@qq.com)
 *  @日   期:  2021年11月1日
 */
package com.massyframework.beanskin.util.classloading;

import com.massyframework.beanskin.ModuleIdentifier;

/**
 * 资源定位过滤器
 * 
 * <p>
 * 当{@link ModuleClassLoader#getResource(String)}、{@link ModuleClassLoader#getResources(String)}
 * 方法时，如果资源不是处于BEANSKIN-INF目录下，可以通过本接口设置资源定位的排除的范围。
 * @author huangkh
 *
 */
public interface ResourceLocateFilter {
	
	/**
	 * 资源名称
	 * @return {@link String}
	 */
	String[] getResourceNames();

	/**
	 * {@code moduleIdentifier}对应的模块是否为需要排斥的搜索路径
	 * @param moduleIdentifier {@link ModuleIdentifier},模块标识符
	 * @return {@link boolean},返回{@code true}表示需要排除，否则返回{@code false}
	 */
	boolean isExclude(ModuleIdentifier moduleIdentifier);
}
